import{createRouter,createWebHistory} from 'vue-router'
const router = createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:'/',
            redirect:'/login'
        },
        {
            path:'/login',
            component:()=>import('../views/login.vue')
        },
        {
            path:'/regist',
            component:()=>import('../views/regist.vue')
        },
        {
            path:'/userinfo',
            component:()=>import('../views/userInfo.vue')
        },
        {
            path:'/main',
            component:()=>import('../main/Main.vue'),
            children:[
                {
                    path:'adminAddInvest',
                    component:()=>import('../views/invest/AdminAddInvest.vue')
                },
                {
                    path:'adminInvestList',
                    component:()=>import('../views/invest/AdminInvestList.vue')
                },
                {
                    path:'adminInvestUpd',
                    component:()=>import('../views/invest/AdminInvestUpd.vue')
                },
                {
                    path:'borrowAdd',
                    component:()=>import('../views/borrow/BorrowAdd.vue')
                },
                {
                    path:'borrowList',
                    component:()=>import('../views/borrow/BorrowList.vue')
                },
                {
                    path:'userInvestList',
                    component:()=>import('../views/invest/UserInvestList.vue')
                },
                {
                    path:'adminnInvestList',
                    component:()=>import('../views/invest/AdminnInvestList.vue')
                },
                {
                    path:'userInvest',
                    component:()=>import('../views/invest/UserInvest.vue')
                },
                {
                    path:'adminCheckUserInvest',
                    component:()=>import('../views/invest/AdminCheckUserInvest.vue')
                },
                {
                    path:'userReedem',
                    component:()=>import('../views/invest/UserReedem.vue')
                },
                {
                    path:'userInvestRedeemList',
                    component:()=>import('../views/invest/UserInvestRedeemList.vue')
                },
                {
                    path:'adminInvestRedeemList',
                    component:()=>import('../views/invest/AdminInvestRedeemList.vue')
                },
                {
                    path:'adminUserInfos',
                    component:()=>import('../views/invest/AdminUserInfos.vue')
                },
                {
                    path:'adminAddFinance',
                    component:()=>import('../views/finance/AdminAddFinance.vue')
                },
                {
                    path:'adminFinanceList',
                    component:()=>import('../views/finance/AdminFinanceList.vue')
                },
                {
                    path:'borrowUpd',
                    component:()=>import('../views/borrow/BorrowUpd.vue')
                },
                {
                    path:'userBorrowList',
                    component:()=>import('../views/borrow/UserBorrowList.vue')
                },
                {
                    path:'adminBorrowList',
                    component:()=>import('../views/borrow/AdminBorrowList.vue')
                },
                {
                    path:'userBorrow',
                    component:()=>import('../views/borrow/UserBorrow.vue')
                },
                {
                    path:'adminBorrow',
                    component:()=>import('../views/borrow/AdminBorrow.vue')
                },
                {
                    path:'adminborrowRedeemList',
                    component:()=>import('../views/borrow/AdminborrowRedeemList.vue')
                },
                {
                    path:'userborrowRedeemList',
                    component:()=>import('../views/borrow/UserborrowRedeemList.vue')
                },
                {
                    path:'userRedeem',
                    component:()=>import('../views/borrow/UserRedeem.vue')
                },
                {
                    path:'adminRedeem',
                    component:()=>import('../views/borrow/AdminRedeem.vue')
                },
                {
                    path:'userFinanceList',
                    component:()=>import('../views/finance/UserFinanceList.vue')
                },
                {
                    path:'adminFinanceItem',
                    component:()=>import('../views/finance/AdminFinanceItem.vue')
                },
                {
                    path:'userFinance',
                    component:()=>import('../views/finance/UserFinance.vue')
                },
            ]
        },
        
    ] //路由配置
})
export default router   